const StuResume = function (){
    const baseUrl = `http://101.42.178.195:8080/StuResume`
    return {
        /**
         * 添加履历
         * @param citizenId
         * @param data
         * @returns {Promise<*>}
         */
        async addResume(citizenId,data){
            return await axios.post(`${baseUrl}/Add?citizenId=${citizenId}`,{
                ...data
            })
        },
        /**
         * 删除履历
         * @param citizenId
         * @param resumeId
         * @returns {Promise<*>}
         */
        async deleteResume(citizenId,resumeId){
            return await axios.post(`${baseUrl}/Delete?citizenId=${citizenId}&resumeId=${resumeId}`)
        },
        /**
         * 更新履历
         * @param citizenId
         * @param resumeId
         * @param data
         * @returns {Promise<*>}
         */
        async updateResume(citizenId,resumeId,data){
            return await axios.post(`${baseUrl}/Update?citizenId=${citizenId}&resumeId=${resumeId}`,{
                ...data
            })
        },
        /**
         * 获取全部履历
         * @param citizenId
         * @returns {Promise<*>}
         */
        async getAllResume(citizenId) {
            return await axios.get(`${baseUrl}/GetAll?citizenId=${citizenId}`)
        },
        /**
         * 获取某段简历详情
         * @param citizenId
         * @param resumeId
         * @returns {Promise<*>}
         */
        async getParagraphs(citizenId,resumeId) {
            return await axios.get(`${baseUrl}/Get?citizenId=${citizenId}&resumeId=${resumeId}`)
        },
    }
}()